package com.example.demo.mapper;

import com.example.demo.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

@Mapper
public interface UserMapper {

    //插入用户信息
    //@Insert("insert into user values(null,#{username},#{password})")
    int insert(User user);

    //根据用户名查询
    //@Select("select * from user where username = #{username}")
    User selectByName(String username);


}
